package com.hxc.basicdata.service.impl;

import java.util.List;
import com.hxc.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.hxc.basicdata.mapper.TVillagerConditionsMapper;
import com.hxc.basicdata.domain.TVillagerConditions;
import com.hxc.basicdata.service.ITVillagerConditionsService;

/**
 * 村情信息Service业务层处理
 * 
 * @author hxc
 * @date 2021-08-20
 */
@Service
public class TVillagerConditionsServiceImpl implements ITVillagerConditionsService 
{
    @Autowired
    private TVillagerConditionsMapper tVillagerConditionsMapper;

    /**
     * 查询村情信息
     * 
     * @param id 村情信息主键
     * @return 村情信息
     */
    @Override
    public TVillagerConditions selectTVillagerConditionsById(Long id)
    {
        return tVillagerConditionsMapper.selectTVillagerConditionsById(id);
    }

    /**
     * 查询村情信息列表
     * 
     * @param tVillagerConditions 村情信息
     * @return 村情信息
     */
    @Override
    public List<TVillagerConditions> selectTVillagerConditionsList(TVillagerConditions tVillagerConditions)
    {
        return tVillagerConditionsMapper.selectTVillagerConditionsList(tVillagerConditions);
    }

    /**
     * 新增村情信息
     * 
     * @param tVillagerConditions 村情信息
     * @return 结果
     */
    @Override
    public int insertTVillagerConditions(TVillagerConditions tVillagerConditions)
    {
        tVillagerConditions.setCreateTime(DateUtils.getNowDate());
        return tVillagerConditionsMapper.insertTVillagerConditions(tVillagerConditions);
    }

    /**
     * 修改村情信息
     * 
     * @param tVillagerConditions 村情信息
     * @return 结果
     */
    @Override
    public int updateTVillagerConditions(TVillagerConditions tVillagerConditions)
    {
        return tVillagerConditionsMapper.updateTVillagerConditions(tVillagerConditions);
    }

    /**
     * 批量删除村情信息
     * 
     * @param ids 需要删除的村情信息主键
     * @return 结果
     */
    @Override
    public int deleteTVillagerConditionsByIds(Long[] ids)
    {
        return tVillagerConditionsMapper.deleteTVillagerConditionsByIds(ids);
    }

    /**
     * 删除村情信息信息
     * 
     * @param id 村情信息主键
     * @return 结果
     */
    @Override
    public int deleteTVillagerConditionsById(Long id)
    {
        return tVillagerConditionsMapper.deleteTVillagerConditionsById(id);
    }

}
